package com.wyp168.leetcode;

/**
 * @ClassName BusyStudent
 * @Description TODO
 * @Author wyp168
 * @Date 2022/8/19 08:00
 */
public class BusyStudent {
    public static void main(String[] args) {
        BusyStudent busyStudent = new BusyStudent();
        int[] startTime = {4};
        int[] endTime = {4};
        System.out.println(busyStudent.busyStudent(startTime, endTime, 4));
    }
    public int busyStudent(int[] startTime, int[] endTime, int queryTime) {
        if (startTime.length == 0) {
            return 0;
        }
        int countCondition = 0;
        int length = startTime.length;
        for (int i = 0; i < length; i++) {
            if (queryTime >= startTime[i] && queryTime <= endTime[i]) {
                countCondition ++;
            }
        }
        return countCondition;
    }
}
